package com.jeesite.modules.rt.entity;

import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.Date;

/**
 * 网络信息Entity
 * @author 李寒冰
 * @version 2024-09-26
 */
@Table(name="rt_device_line", alias="a", label="网络信息信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="device_id", attrName="deviceId", label="设备ID"),
		@Column(name="net_type", attrName="netType", label="NET类型"),
		@Column(name="gateway", attrName="gateway", label="网关"),
		@Column(name="local_ip", attrName="localIp", label="内网IP"),
		@Column(name="public_ip", attrName="publicIp", label="外网IP"),
		@Column(name="isp_code", attrName="ispCode", label="运营商"),
		@Column(name="mac", attrName="mac", label="MAC地址"),
		@Column(name="nat", attrName="nat", label="NAT类型"),
		@Column(name="upnp_ip", attrName="upnpIp", label="upnpip"),
		@Column(name="upnp_gateway", attrName="upnpGateway", label="upnp网关"),
		@Column(name="ping_loss", attrName="pingLoss", label="丢包率"),
		@Column(name="ping_rtt", attrName="pingRtt", label="延迟"),
		@Column(name="ipv6", attrName="ipv6", label="IPV6地址"),
		@Column(name="is_ipv6", attrName="isIpv6", label="是否是ipv6"),
		@Column(name="online_code", attrName="onlineCode", label="是否在线"),
		@Column(name="province_city", attrName="provinceCity", label="省份-城市"),
		@Column(name="speed", attrName="speed", label="测试宽带"),
		@Column(name="sn", attrName="sn", label="设备SN"),
		@Column(name="line_refresh_time", attrName="lineRefreshTime", label="设备刷新时间"),
}, orderBy="a.id DESC"
)
public class RtDeviceLine extends DataEntity<RtDeviceLine> {
	
	private static final long serialVersionUID = 1L;
	private String deviceId;		// 设备ID
	private String netType;		// NET类型
	private String gateway;		// 网关
	private String localIp;		// 内网IP
	private String publicIp;		// 外网IP
	private String ispCode;		// 运营商
	private String mac;		// MAC地址
	private String nat;		// NAT类型
	private String upnpIp;		// upnpip
	private String upnpGateway;		// upnp网关
	private String pingLoss;		// 丢包率
	private String pingRtt;		// 延迟
	private String ipv6;		// IPV6地址
	private String isIpv6;		// 是否是ipv6
	private String onlineCode;		// 是否在线
	private String provinceCity;		// 省份-城市
	private String speed;		// 测试宽带
	private String sn;
	private Date lineRefreshTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getLineRefreshTime() {
		return lineRefreshTime;
	}

	public void setLineRefreshTime(Date lineRefreshTime) {
		this.lineRefreshTime = lineRefreshTime;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public RtDeviceLine() {
		this(null);
	}
	
	public RtDeviceLine(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="设备ID长度不能超过 50 个字符")
	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	
	@Size(min=0, max=10, message="NET类型长度不能超过 10 个字符")
	public String getNetType() {
		return netType;
	}

	public void setNetType(String netType) {
		this.netType = netType;
	}
	
	@Size(min=0, max=255, message="网关长度不能超过 255 个字符")
	public String getGateway() {
		return gateway;
	}

	public void setGateway(String gateway) {
		this.gateway = gateway;
	}
	
	@Size(min=0, max=255, message="内网IP长度不能超过 255 个字符")
	public String getLocalIp() {
		return localIp;
	}

	public void setLocalIp(String localIp) {
		this.localIp = localIp;
	}
	
	@Size(min=0, max=255, message="外网IP长度不能超过 255 个字符")
	public String getPublicIp() {
		return publicIp;
	}

	public void setPublicIp(String publicIp) {
		this.publicIp = publicIp;
	}
	
	@Size(min=0, max=255, message="运营商长度不能超过 255 个字符")
	public String getIspCode() {
		return ispCode;
	}

	public void setIspCode(String ispCode) {
		this.ispCode = ispCode;
	}
	
	@Size(min=0, max=255, message="MAC地址长度不能超过 255 个字符")
	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}
	
	@Size(min=0, max=255, message="NAT类型长度不能超过 255 个字符")
	public String getNat() {
		return nat;
	}

	public void setNat(String nat) {
		this.nat = nat;
	}
	
	@Size(min=0, max=255, message="upnpip长度不能超过 255 个字符")
	public String getUpnpIp() {
		return upnpIp;
	}

	public void setUpnpIp(String upnpIp) {
		this.upnpIp = upnpIp;
	}
	
	@Size(min=0, max=255, message="upnp网关长度不能超过 255 个字符")
	public String getUpnpGateway() {
		return upnpGateway;
	}

	public void setUpnpGateway(String upnpGateway) {
		this.upnpGateway = upnpGateway;
	}
	
	@Size(min=0, max=255, message="丢包率长度不能超过 255 个字符")
	public String getPingLoss() {
		return pingLoss;
	}

	public void setPingLoss(String pingLoss) {
		this.pingLoss = pingLoss;
	}
	
	@Size(min=0, max=255, message="延迟长度不能超过 255 个字符")
	public String getPingRtt() {
		return pingRtt;
	}

	public void setPingRtt(String pingRtt) {
		this.pingRtt = pingRtt;
	}
	
	@Size(min=0, max=255, message="IPV6地址长度不能超过 255 个字符")
	public String getIpv6() {
		return ipv6;
	}

	public void setIpv6(String ipv6) {
		this.ipv6 = ipv6;
	}
	
	@Size(min=0, max=255, message="是否是ipv6长度不能超过 255 个字符")
	public String getIsIpv6() {
		return isIpv6;
	}

	public void setIsIpv6(String isIpv6) {
		this.isIpv6 = isIpv6;
	}

	public String getOnlineCode() {
		return onlineCode;
	}

	public void setOnlineCode(String onlineCode) {
		this.onlineCode = onlineCode;
	}

	@Size(min=0, max=255, message="省份-城市长度不能超过 255 个字符")
	public String getProvinceCity() {
		return provinceCity;
	}

	public void setProvinceCity(String provinceCity) {
		this.provinceCity = provinceCity;
	}
	

	
	@Size(min=0, max=255, message="测试宽带长度不能超过 255 个字符")
	public String getSpeed() {
		return speed;
	}

	public void setSpeed(String speed) {
		this.speed = speed;
	}
	
}